<template>
  <div class="list">
    <div class="hot_list">
      <ul>
        <li class="item border-bottom" v-for="item of recommendList" :key="item.id" @click="$router.push(`/detail/${item.id}`)">
          <!-- { name: 'detail', params: { index } } -->
          <img class="item-img" :src="item.imgUrl"/>
          <div class="item-info">
            <p class="item-title">{{ item.title }}</p>
            <div class="item-desc">{{ item.desc }}</div>
            <button class="item-btn">查看详情</button>
          </div>
        </li>
        <div class="footer">查看更多产品</div>
      </ul>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    recommendList: Array
  },
  data() {
    return {};
  }
};
</script>
<style lang="scss" scoped>
.list {
  background: #fff;
  width: 100%;
  .hot_list {
    ul {
      padding: 0.12rem;
      width: 7.5rem;
      //   overflow: auto;
      li {
        width: 7.5rem;
        display: flex;
        justify-content: space-between;
        height: 2.2rem;
        img {
          width: 2rem;
          height: 2rem;
        }
        .item-info {
          width: 5.1rem;
          height: 2rem;
          display: flex;
          justify-content: space-around;
          flex-direction: column;
          .item-title {
            color: #333;
            font-size: 0.36rem;
            font-weight: 600;
          }
          .item-desc {
            width: 100%;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            font-size: 0.26rem;
            color: #858585;
          }
          .item-btn {
            width: 2rem;
            border: none;
            height: 0.46rem;
            border-radius: 0.1rem;
            background: #fe950e;
            font-size: 0.32rem;
            color: #fff;
          }
        }
      }
    }
    .footer {
      // border-top: .02rem solid #ccc;
      height: 0.6rem;
      line-height: 0.6rem;
      text-align: center;
      color: #2fbdd1;
      font-size: 0.32rem;
    }
  }
}
</style>
